--- panda-0.2.orig/panda.py	2014-11-14 02:12:02.000000000 +0200
+++ panda-0.2/panda.py	2014-11-14 02:20:47.921188120 +0200
@@ -46,6 +46,10 @@
                                          "xorg-video-nvidia173",
                                          "nvidia-xconfig",
                                          "nvidia-settings"],
+                           "nvidia340": ["module-nvidia340",
+                                         "xorg-video-nvidia340",
+                                         "nvidia-xconfig",
+                                         "nvidia-settings"],
                            "nvidia304": ["module-nvidia304",
                                          "xorg-video-nvidia304",
                                          "nvidia-xconfig",
@@ -53,6 +58,7 @@
         if util.get_platform() == "linux-x86_64":
             self.driver_packages["fglrx"].append("xorg-video-fglrx-32bit")
             self.driver_packages["nvidia-current"].append("xorg-video-nvidia-current-32bit")
+            self.driver_packages["nvidia340"].append("xorg-video-nvidia340-32bit")
 
     def __get_primary_driver(self):
         '''Get driver name for the working primary device'''
@@ -124,7 +130,7 @@
         if self.driver_name == "fglrx":
             self.os_driver = "radeon"
             return self.os_driver
-        elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"]:
+        elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304" ,"nvidia340"]:
             self.os_driver = "nouveau"
             return self.os_driver
         else:
@@ -173,10 +179,10 @@
         status, modified = self.update_grub_default_entries(arg)
         if status in ["os", "generic", "vendor"] and modified:
             self.update_grub_cfg()
-            self.set_libGL(self.driver_name if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "fglrx"] and status == "vendor" else "mesa")
-            if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"] and status == "vendor":
+            self.set_libGL(self.driver_name if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "nvidia340", "fglrx"] and status == "vendor" else "mesa")
+            if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "nvidia340"] and status == "vendor":
                 open(nvidia_blacklist_file, "w").write("blacklist nouveau\n")
-            elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"] and os.path.isfile(nvidia_blacklist_file):
+            elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "nvidia340"] and os.path.isfile(nvidia_blacklist_file):
                 os.remove(nvidia_blacklist_file)
 
         return status
@@ -224,7 +230,7 @@
         if self.driver_name is None:
             self.__get_primary_driver()
 
-        if self.driver_name in "fglrx" or self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"]:
+        if self.driver_name in "fglrx" or self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "nvidia340"]:
             return ["vendor", "os", "generic"]
         elif "Not defined" == self.driver_name:
             return ["os", "generic"]
